define(['./prjCtrl.map', './prjCtrl.calendar', './prjCtrl.change', './../../service/loadProjectMap'], function () {
    var app = angular.module('App');
    app.controller('prjCtrl', ['$state', '$controller', '$scope', 'Project', 'viewbag', 'daterangeLocale', 'loadProjectMap', function ($state, $controller, $scope, Project, viewbag, daterangeLocale, loadProjectMap) {
        $scope.curType = viewbag.curType;
        $scope.prj = viewbag.curPrj;
        //扩展controller
        $controller('prjCtrl.map', { $scope: $scope })
        $controller('prjCtrl.calendar', { $scope: $scope })
        $controller('prjCtrl.change', { $scope: $scope })


        $scope.search();

        /** 查看更多的工况 */
        $scope.viewMoreStatus = function () {
            if ($scope.prj.status && $scope.prj.status.title) {
                $state.go('.status');
            } else {
                toastr.warning('项目经理暂时还没有上传任何工况', '没有工况', { timeOut: 5000, "positionClass": "toast-bottom-right", "closeButton": true });
            }
        }


    }]);

});